home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / GAMES / WIMP / MINES2 / !Mines / c / Hintdebug < prev    next >
Text File  |  1995-01-14  |  1KB  |  46 lines

  1.  
  2. int save_recurse=FALSE;
  3. FILE *save_recursef;
  4.  
  5. void save_border(FILE *f)
  6. {
  7.     border_typ *i;
  8.     for (i=border_arr;i<border_anz;i++)
  9.         fprintf(f,"%2i %2i %2i %2i\n",i->x,i->y,i->domain,feld[i->x][i->y]);
  10.     fprintf(f,"\n");
  11. }
  12.  
  13. void hint_debug(void)
  14. {
  15.     int found_7,domain;border_typ *border;
  16.     for (border=border_arr;border<border_anz;border++)
  17.         {
  18.             int d=feld[border->x][border->y];
  19.             if (((d & h_MASK)==h_NOMINE) && (d & MINE))
  20.                   werr(FALSE,"Error: No mine assumed and mine found");
  21.             if (((d & h_MASK)==h_MINE) && !(d & MINE))
  22.                   werr(FALSE,"Error: Mine assumed and no mine found");
  23.         }
  24.     for (border=border_arr;border<border_anz;border++)
  25.         {
  26.             int x=border->x,y=border->y;
  27.             int d=feld[x][y] & h_MASK;
  28.             if (d==h_MINE) draw_sprite(x,y,&mine.id);
  29.             if (d==h_NOMINE) draw_sprite(x,y,&nomine.id);
  30.             if (d==h_UNKNOWN) draw_sprite(x,y,&questionmark.id);
  31.             if (d==h_EVERYTHING) found_7=TRUE;
  32.         }
  33.     if (found_7)
  34.     {
  35.         save_recurse=TRUE;
  36.         save_recursef=fopen("<Mines$Dir>.Recurse","w");
  37.         border=border_arr;domain=1;
  38.         do {
  39.             if (border<border_anz) permutate1(border,0,domain);
  40.             while ((border->domain==domain) && (border<border_anz)) border++;
  41.             domain++;
  42.         } while (border<border_anz);
  43.         fclose(save_recursef);save_recurse=FALSE;
  44.     }
  45. }
  46.